#include<iostream>
int main()
{
	long a,ge,shi,bai;
	for(a=100;a<=999;a++)
		{
		ge=a%10;
		shi=(a%100)/10;
		bai=a/100;
		if(a==ge*ge*ge+shi*shi*shi+bai*bai*bai)
		printf("%ld\n",a);
		}
	system("pause");
	return 0;
}
